|
|
|
|
|
|
|
Setting the Flags property to cdlPDPrintSetup causes the Print Setup dialog box to come up instead of the Printer Selection dialog box. |
|
|
|
 |
|
|
|
|
NOTE This dialog box actually changes your Windows default printer. |
|
|
|
|
|
|
|
|
The Font dialog box can be used to change fonts for a text box, label, or any control that has a Font property. You can invoke this dialog box using the ShowFont method of the common dialog control. You might use this dialog when you allow the user to modify the settings of the fonts within a form or within the entire application. Figure 11.10 shows an example of what the Font dialog looks like. |
|
|
|
|
|
|
|
|
Figure 11.10
The Font dialog box. |
|
|
|
|
|
|
|
|
The Font dialog box is generated with the following code: |
|
|
|
 |
|
|
|
|
Private Sub cmdFont_Click()
' Select both printer and screen fonts
cdlCommon.Flags = cdlCFBoth
' Display the Font dialog box cdlCommon.ShowFont
' Get the Font information
With lblFont
.FontName = cdlCommon.FontName
.FontBold = cdlCommon.FontBold
.FontItalic = cdlCommon.FontItalic
.FontSize = cdlCommon.FontSize
End With
End Sub |
|
|
|
|
|